// import { resolve } from 'path'
import path from "node:path";
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
import vue from '@vitejs/plugin-vue'

import UnoCSS from 'unocss/vite'

const pathSrc = path.resolve(__dirname, "src");


console.log(pathSrc);

export default defineConfig({
  main: {
    plugins: [externalizeDepsPlugin()]
  },
  preload: {
    plugins: [externalizeDepsPlugin()]
  },
  renderer: {
    resolve: {
      alias: {
        '@renderer': `${pathSrc}/renderer/src`,
        // `${pathSrc}/src/renderer/src`
      }
    },
    css: {
      preprocessorOptions: {
        less: {},
      },
    },
    plugins: [vue(),UnoCSS()]
  }
})
